﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Invoice.aspx.cs" Inherits="TotalSport.Invoice" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register TagName="header" TagPrefix="uc" Src="~/Header.ascx" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>::Create Invoice::</title>
    <link href="Styles/Stylsheet.css" rel="stylesheet" type="text/css" />
    <link href="Styles/Popup.css" rel="stylesheet" type="text/css" />



</head>
<body>
    <form id="form1" runat="server">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <center>
        <div>
            <uc:header runat="server" ID="aa" />
        </div>
        <br />
    </center>
    <center>
        <br />
        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
            <ProgressTemplate>
                <center>
                    <div id="pageLoading">
                        <center>
                            <img src="Images/loading .gif" style="z-index: 5000; top: 50%; left: 50%; position: absolute;"
                                alt="loading" />
                            <div style="color: White; font-size: 18px; top: 50%; left: 50%;">
                                Loading...
                            </div>
                        </center>
                        <div id="transparentBg" class="transparentBg">
                        </div>
                    </div>
                </center>
            </ProgressTemplate>
        </asp:UpdateProgress>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <fieldset style="width: 700px; color: #054287; text-align: left">
                    <legend>Create Invoice</legend>
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                <table border="0" cellpadding="3" cellspacing="0">
                                    <tr>
                                        <td>
                                            <span id="spnMsg" class="spanMsgs" style="display: none" runat="server"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <table cellpadding="0" cellspacing="3" width="700px">
                                                <tr>
                                                    <td align="left" valign="top" width="250px">
                                                        <asp:Label ID="name" runat="server" Text="Recipient Name :" CssClass="lableform">  </asp:Label>
                                                        <asp:Label ID="lblname" runat="server" Text=""></asp:Label>
                                                        <asp:Label ID="lblid" runat="server" Text=""></asp:Label>

                                                    </td>
                                                    <td align="left" valign="top">
                                                        <asp:Label ID="Label9" runat="server" Text="  Company Name :" CssClass="lableform"></asp:Label>
                                                        <asp:Label ID="lblCompanyname" runat="server" Text=""></asp:Label>
                                                    </td>
                                                    <td align="left" valign="top">
                                                        <asp:Label ID="Label10" runat="server" Text="  Email ID :" CssClass="lableform"></asp:Label>
                                                        <asp:Label ID="lblemailid" runat="server" Text=""></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        Contact Number :
                                                        <asp:Label ID="lblcontactno" runat="server" Text=""></asp:Label>
                                                    </td>
                                                    <td align="left" valign="top">
                                                        Location :
                                                        <asp:Label ID="lbllocation" runat="server" Text=""></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="3">
                                                        <hr />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" valign="top">
                                                        <asp:Label ID="Label11" runat="server" Text="    Reference Number :" CssClass="lableform"
                                                            Style="font-weight: bold; color: Maroon"></asp:Label>
                                                        <asp:Label ID="lblRefNo" runat="server" Text="Label"></asp:Label>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style1">
                                            <table>
                                                <tr>
                                                    <td>
                                                        <%--<span id="spnmsg" runat="server" style="display:none"/> --%>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:GridView ID="grdinvoicedtl" runat="server" AutoGenerateColumns="False" CellPadding="3"
                                                            ForeColor="Black" GridLines="Vertical"  Width="700px" BorderColor="#999999"
                                                            BorderWidth="1px" BackColor="White" BorderStyle="Solid" OnPageIndexChanging="grdinvoicedtl_PageIndexChanging"
                                                            EmptyDataText="No Data Found" DataKeyNames="SubId">
                                                            <AlternatingRowStyle BackColor="#DDE7FB" />
                                                            <Columns>
                                                                <%-- <asp:BoundField DataField="Price" HeaderText="Price" />--%>
                                                                <%-- <asp:TemplateField HeaderText="Remove">
                                                        <ItemTemplate>                                                          
                                                            <asp:LinkButton ID="lnkRemove" runat="server" CausesValidation="false" CommandName="RemovePro"
                                                        OnCommand="ShowRemoveProduct">Remove</asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>--%>
                                                                <asp:BoundField DataField="Name" HeaderText="Particular Name" />
                                                                <asp:BoundField DataField="BrandName" HeaderText="Brand Name" />
                                                                <asp:BoundField DataField="ItemCode" HeaderText="Code" />
                                                                <asp:TemplateField HeaderText=" price ">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblprice" runat="server" Text='<%# Bind("price")%>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Quantity">
                                                                    <ItemTemplate>
                                                                        <asp:TextBox ID="txtquanty" runat="server" MaxLength="3" SkinID="dsctrate" ontextchanged="txtquanty_TextChanged" 
                                                                             AutoPostBack="true"   ></asp:TextBox>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Final Price ">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblcalcqtyprice" runat="server" Text='<%# Bind("price")%>'></asp:Label>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                            <EmptyDataRowStyle BackColor="#CC3300" />
                                                            <FooterStyle BackColor="#CCCCCC" />
                                                            <HeaderStyle BackColor="#045E84" Font-Bold="True" ForeColor="White" />
                                                            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                                                            <SelectedRowStyle CssClass="gridSelectedRowStyle" BackColor="#FF9933" Font-Bold="True"
                                                                ForeColor="White" />
                                                            <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                                            <SortedAscendingHeaderStyle BackColor="#808080" />
                                                            <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                                            <SortedDescendingHeaderStyle BackColor="#383838" />
                                                        </asp:GridView>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div style="width: 700px">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                <%--           <fieldset>
                                    <legend>Notes :</legend>
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:CheckBox ID="chkVAT" runat="server" Text="VAT will be charged extra(As Per Subcategory)"
                                                    Checked="true" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:CheckBox ID="chkAdvance" runat="server" Text="Advance " Checked="true" />
                                                <asp:TextBox ID="txtAdvance" runat="server" SkinID="notestxt"></asp:TextBox>
                                                <asp:RequiredFieldValidator Display="None" ValidationGroup="savesend" ID="RequiredFieldValidator5"
                                                    runat="server" ErrorMessage="Enter Advance Amount " ControlToValidate="txtAdvance"
                                                    SetFocusOnError="true"></asp:RequiredFieldValidator>
                                                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" TargetControlID="RequiredFieldValidator5">
                                                </asp:ValidatorCalloutExtender>
                                                <asp:Label ID="Label8" runat="server" Text="with P.O. and balance on delivery"></asp:Label>
                                            </td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:CheckBox ID="chkDelivaryCharge" runat="server" Text="Delivery Charges " Checked="true" />
                                <asp:TextBox ID="txtDeliveryChanrge" runat="server" SkinID="notestxt"></asp:TextBox>
                                <asp:RequiredFieldValidator Display="None" ID="RequiredFieldValidator6" runat="server"
                                    ValidationGroup="savesend" ErrorMessage="Enter Delivery charge Amount" ControlToValidate="txtDeliveryChanrge"
                                    SetFocusOnError="true"></asp:RequiredFieldValidator>
                                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" TargetControlID="RequiredFieldValidator6">
                                </asp:ValidatorCalloutExtender>
                                <asp:Label ID="txtlnl" runat="server" Text="Will be Extra"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:CheckBox ID="chkUrgentD" runat="server" Text="Delivery within" Checked="true" />
                                <asp:TextBox ID="txtdelivarywithin" runat="server" SkinID="notestxt"></asp:TextBox>
                                <asp:RequiredFieldValidator Display="None" ControlToValidate="txtdelivarywithin"
                                    ID="RequiredFieldValidator7" runat="server" ValidationGroup="savesend" ErrorMessage="Enter Delivery Charges"
                                    SetFocusOnError="true"></asp:RequiredFieldValidator>
                                <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" TargetControlID="RequiredFieldValidator7"
                                    runat="server">
                                </asp:ValidatorCalloutExtender>
                                <asp:Label ID="Label6" runat="server" Text=" days from P.O."></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:CheckBox ID="chkChquename" runat="server" Text="Cheque  shall be drawn in favour of <b><u>'Total Sporting And Fitness Solutions Pvt. Ltd.'</u></b>"
                                    Checked="true" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:CheckBox ID="chkValidity" runat="server" Text="Validity of Quotation is 30 Days."
                                    Checked="true" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:CheckBox ID="chkoctroi" runat="server" Text="All prices quoted are Ex-Works, freight, insurance,octroi, taxes and levies will be charged extra as applicable."
                                    Checked="true" OnCheckedChanged="chkoctroi_CheckedChanged" />
                            </td>
                        </tr>
                    </table>
                </fieldset>--%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Button ID="btnsave" runat="server" Text="Save " Style="width: 55px" 
                                    onclick="btnsave_Click"  />
                                &nbsp;&nbsp; &nbsp;&nbsp;
                                <asp:Button ID="btncancel" runat="server" Text="Cancel " PostBackUrl="~/SelectQuotes.aspx" Style="width: 55px" />
                                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Show Quotes" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </ContentTemplate>
            <%--<Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnAddProduct" EventName="Click" />
            </Triggers>--%>
        </asp:UpdatePanel>
    </center>
    <center>
        <div>
        </div>
    </center>
    </form>
</body>
</html>
